<html>
<head><meta charset="utf-8"><title>WF bounds in trait declarations · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html">WF bounds in trait declarations</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236873129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236873129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236873129">(Apr 30 2021 at 17:36)</a>:</h4>
<p>This is from <a href="https://github.com/rust-lang/rust/issues/84366">#84366</a>, so it might be part of the bug, but perhaps someone can explain why this is valid?</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="p">,</span><span class="w"> </span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="nc">Self</span>::<span class="n">Associated</span><span class="p">,</span><span class="w"> </span><span class="n">proof</span>: <span class="nc">PhantomData</span><span class="o">&lt;&amp;'</span><span class="na">b</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Associated</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="nc">T</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>I would have expected something like</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="p">,</span><span class="w"> </span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span>: <span class="o">'</span><span class="na">b</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="nc">Self</span>::<span class="n">Associated</span><span class="p">,</span><span class="w"> </span><span class="n">proof</span>: <span class="nc">PhantomData</span><span class="o">&lt;&amp;'</span><span class="na">b</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Associated</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="nc">T</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>since otherwise the two reference types are not well formed.</p>



<a name="236873341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236873341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236873341">(Apr 30 2021 at 17:38)</a>:</h4>
<p>Or is it that the bounds are implicitly added to the function instead, like this:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="p">,</span><span class="w"> </span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="nc">Self</span>::<span class="n">Associated</span><span class="p">,</span><span class="w"> </span><span class="n">proof</span>: <span class="nc">PhantomData</span><span class="o">&lt;&amp;'</span><span class="na">b</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Associated</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="nc">T</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"> </span><span class="n">T</span>: <span class="o">'</span><span class="na">b</span><span class="p">,</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Associated</span>: <span class="o">'</span><span class="na">b</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="236910230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236910230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank Steffahn <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236910230">(Apr 30 2021 at 22:05)</a>:</h4>
<p>Interesting question. I haven’t even thought about that part, since <code>T: 'b</code> bounds weren’t anything I worried about in that example. Perhaps it’s related to the fact that the presence of a <code>(self)</code> method doesn’t require any <code>Self: Sized</code> bounds? At least I did never really understand why that it is the way it is.</p>
<p>By the way it isn’t part of the bug, AFAICT. Well, at least you can easily add the <code>T: 'b</code> bound to the trait and the impl and everything still compiles. As I said, <code>T: 'b</code> wasn’t anything I worried about / was trying to (unsoundly) convince the compiler to be true.</p>



<a name="236911683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236911683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank Steffahn <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236911683">(Apr 30 2021 at 22:22)</a>:</h4>
<p>Wait, you wrote <code>Associated: 'b</code>, too. That seems more relevant to the problem / I don’t think my impl works anymore with that in place. It wouldn’t solve the original problem entirely of course, e.g. the original code example I gave still works AFAICT.</p>



<a name="236912525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236912525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236912525">(Apr 30 2021 at 22:31)</a>:</h4>
<p>The rule that says <code>T: 'a</code> implies <code>T::Associated: 'a</code> seems very strange to me given that there doesn't seem to be a corresponding proof obligation when constructing the impl: in</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">b</span><span class="p">,</span><span class="w"> </span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">F</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">F</span>: <span class="nb">Fn</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="kt">str</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="n">T</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="n">_</span>: <span class="nc">PhantomData</span><span class="o">&lt;&amp;'</span><span class="na">b</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="nc">T</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">x</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>it seems like <code>'a: 'b</code> ought to be available, although I'm not sure if it's an assumption or an obligation.</p>



<a name="236913132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236913132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236913132">(Apr 30 2021 at 22:38)</a>:</h4>
<p>I <em>think</em> that what is happening here is that <code>&amp;'a str</code> is known to be an associated type of <code>F</code> (specifically <code>&lt;F as Fn&gt;::Output</code>), so if we assume in this impl that <code>F: 'b</code>, then we can conclude (by reverse engineering WF bounds) that <code>&amp;'a str: 'b</code> and hence <code>'a: 'b</code> so the <code>Associated = &amp;'a T</code> is okay (it actually does outlive <code>'b</code>).</p>



<a name="236913235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236913235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236913235">(Apr 30 2021 at 22:40)</a>:</h4>
<p>Right now though a lot of those WF bounds only exist implicitly and I think this makes the handling bug-prone. (The inability to have bounded quantifiers like <code>for&lt;'a: 'b&gt; fn(...)</code> types is also related to this, but maybe that's another discussion.)</p>



<a name="236915178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236915178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank Steffahn <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236915178">(Apr 30 2021 at 23:04)</a>:</h4>
<p>I think the <code>T: 'b, Self::Associated: 'b</code> bounds on the method itself are the correct interpretation. The code still does compile fine if they are added.</p>



<a name="236915700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236915700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank Steffahn <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236915700">(Apr 30 2021 at 23:11)</a>:</h4>
<p>Regarding <code>T: 'a</code> implies <code>T::Associated: 'a</code>, the relevant RFC is <a href="https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md">1214</a>. I haven’t read it in detail myself yet.</p>
<p>Regarding the trait impl in question, the corresponding proof obligation is indeed fulfilled by the <code>F: Fn() -&gt; &amp;'a str</code> bound. If you comment that out, you get some</p>
<div class="codehilite"><pre><span></span><code>error[E0207]: the lifetime parameter `&#39;a` is not constrained by the impl trait, self type, or predicates
  --&gt; src/main.rs:8:6
   |
 8 | impl&lt;&#39;a, &#39;b, T: ?Sized + &#39;a, F&gt; FancyTrait&lt;&#39;b, T&gt; for F
   |      ^^ unconstrained lifetime parameter
</code></pre></div>



<a name="236916089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236916089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236916089">(Apr 30 2021 at 23:17)</a>:</h4>
<p>Here's an interesting variation. It seems like the only point of the <code>proof</code> argument is so that WF reverse engineering injects <code>'a: 'b</code>, so it should be possible to simply add this assumption without changing the results. But this version fails:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="nc">Self</span>::<span class="n">Associated</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Associated</span>: <span class="o">'</span><span class="na">b</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="kt">str</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="p">())</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Associated</span>: <span class="o">'</span><span class="na">b</span> <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">x</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>with an error that suggests that <code>'a: 'b</code> is not available when typechecking the <code>{ x }</code> body, and</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="n">FancyTrait</span><span class="o">&lt;'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="kt">str</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Associated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="p">())</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">b</span> <span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="p">()</span>: <span class="o">'</span><span class="na">b</span> <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">x</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>manages to infer <code>'a: 'b</code> but fails to match the trait signature</p>



<a name="236916347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236916347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank Steffahn <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236916347">(Apr 30 2021 at 23:20)</a>:</h4>
<blockquote>
<p><code>T: 'a</code> implies <code>T::Associated: 'a</code></p>
</blockquote>
<p>by the way, to be accurate (and as far as I understand), in this case the property/obligation is actually more like<br>
∀<code>'c</code>(<code>F: 'c</code>∧<code>'b: 'c</code>∧<code>T: 'c</code>⟹<code>&lt;F as FancyTrait&lt;'b, T&gt;&gt;::Associated: 'c</code>)</p>



<a name="236916513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236916513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236916513">(Apr 30 2021 at 23:23)</a>:</h4>
<p>(simplified the example)</p>



<a name="236916642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236916642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236916642">(Apr 30 2021 at 23:24)</a>:</h4>
<p>Apparently WF reverse engineering doesn't work through name resolution: <code>Self::Associated: 'b</code> doesn't infer <code>'a: 'b</code> but <code>&amp;'a (): 'b</code> does even though <code>Self::Associated == &amp;'a ()</code></p>



<a name="236916695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236916695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236916695">(Apr 30 2021 at 23:25)</a>:</h4>
<p>this smells like a soundness issue but it might just be an elaboration problem</p>



<a name="236949417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236949417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236949417">(May 01 2021 at 08:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="271719">Mario Carneiro</span> <a href="#narrow/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations/near/236873341">said</a>:</p>
<blockquote>
<p>Or is it that the bounds are implicitly added to the function instead, like this:</p>
</blockquote>
<p>yes</p>



<a name="236949420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236949420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236949420">(May 01 2021 at 08:22)</a>:</h4>
<p>this is the <em>intention</em></p>



<a name="236949423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236949423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236949423">(May 01 2021 at 08:22)</a>:</h4>
<p>there are some known bugs here</p>



<a name="236949435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/WF%20bounds%20in%20trait%20declarations/near/236949435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/WF.20bounds.20in.20trait.20declarations.html#236949435">(May 01 2021 at 08:23)</a>:</h4>
<p>my intent is to resolve them by elaborating more explicitly</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>